#include <57header.h>

/* Usage: ./01_ftruncate filename */
int main(int argc, char *argv[]){
    ARGS_CHECK(argc, 2);
    int fd = open(argv[1], O_RDWR);
    ERROR_CHECK(fd, -1, "open src");

    // 改动文件的大小
    int ret = ftruncate(fd, 100000);
    ERROR_CHECK(ret, -1, "ftruncate");

    close(fd);
    return 0;
}

